import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/main',
            component: () => import(/* webpackChunkName: "dashboard" */ '../page/ManageMain.vue'),
            meta: { title: '系统首页' }
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '/patientAdd',
            component: () => import(/* webpackChunkName: "patient" */ '../page/PatientAdd'),
            meta: { title: '患者新增' }
        },
        {
            path: '/patientList',
            component: () => import(/* webpackChunkName: "patient" */ '../page/PatientList'),
            meta: { title: '患者列表' }
        },
        {
            path: '/train',
            component: () => import(/* webpackChunkName: "patient" */ '../page/Train'),
            meta: { title: '训练页面' }
        },
        {
            path: '/trainrecord',
            component: () => import(/* webpackChunkName: "patient" */ '../page/TrainRecord'),
            meta: { title: '训练记录管理' }
        },
        {
            path: '/hospital',
            component: () => import(/* webpackChunkName: "patient" */ '../page/Hospital.vue'),
            meta: { title: '设备配置管理' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
